const express = require('express');
const router = express.Router();
// 导入所有API路由
const articleApi = require('./api/article_api');
const diaryApi = require('./api/diary_api');
const fileApi = require('./api/file_api');
const labelApi = require('./api/label_api');
const overviewApi = require('./api/overview_api');
const subsetApi = require('./api/subset_api');
const userApi = require('./api/user_api');
const commentApi = require('./api/comment_api');
const messageApi = require('./api/message_api');

// 根路由
router.get('/', (req, res) => {
  res.send('博客后端服务运行中');
});

// 挂载所有API路由
router.use('/api/article', articleApi);
router.use('/api/diary', diaryApi);
router.use('/api/file', fileApi);
router.use('/api/label', labelApi);
router.use('/api/overview', overviewApi);
router.use('/api/subset', subsetApi);
router.use('/api/user', userApi);
router.use('/api/comment', commentApi);
router.use('/api/message', messageApi);

module.exports = router;

